import type { Meta, StoryObj } from "@storybook/react";
import React from "react";
import KxInvestmentAmountPieChart from "./index";

const meta = {
  title: "饼图/可信投资额比例饼图-KxInvestmentAmountPieChart",
  component: KxInvestmentAmountPieChart,
  tags: ["autodocs"],
  argTypes: {},
  decorators: [
    (Story) => (
      <div
        style={{ backgroundColor: "#031857", height: "270px", width: "672px" }}
      >
        <Story />
      </div>
    ),
  ],
} satisfies Meta<typeof KxInvestmentAmountPieChart>;

export default meta;
type Story = StoryObj<typeof meta>;

export const basic: Story = {
  args: {
    dataSource: [
      { amount: 30986.0, name: "本月完成投资" },
      { amount: 134356.0, name: "本年度计划投资" },
      { amount: 185089.0, name: "本年度累计完成投资" },
      { amount: 388066.65, name: "项目总投资" },
    ],
  },
};
